Integrand size = 33, antiderivative size = 318 \[ \int \cos ^m(c+d x) (a+b \cos (c+d x))^2 \left (A+C \cos ^2(c+d x)\right ) \, dx=\frac {\left (2 a^2 C+b^2 (C (3+m)+A (4+m))\right ) \cos ^{1+m}(c+d x) \sin (c+d x)}{d (2+m) (4+m)}+\frac {2 a b C \cos ^{2+m}(c+d x) \sin (c+d x)}{d (3+m) (4+m)}+\frac {C \cos ^{1+m}(c+d x) (a+b \cos (c+d x))^2 \sin (c+d x)}{d (4+m)}-\frac {\left (a^2 (4+m) (C (1+m)+A (2+m))+b^2 (1+m) (C (3+m)+A (4+m))\right ) \cos ^{1+m}(c+d x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1+m}{2},\frac {3+m}{2},\cos ^2(c+d x)\right ) \sin (c+d x)}{d (1+m) (2+m) (4+m) \sqrt {\sin ^2(c+d x)}}-\frac {2 a b (C (2+m)+A (3+m)) \cos ^{2+m}(c+d x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {2+m}{2},\frac {4+m}{2},\cos ^2(c+d x)\right ) \sin (c+d x)}{d (2+m) (3+m) \sqrt {\sin ^2(c+d x)}} \]
(2*a^2*C+b^2*(C*(3+m)+A*(4+m)))*cos(d*x+c)^(1+m)*sin(d*x+c)/d/(2+m)/(4+m)+ 2*a*b*C*cos(d*x+c)^(2+m)*sin(d*x+c)/d/(3+m)/(4+m)+C*cos(d*x+c)^(1+m)*(a+b* cos(d*x+c))^2*sin(d*x+c)/d/(4+m)-(a^2*(4+m)*(C*(1+m)+A*(2+m))+b^2*(1+m)*(C *(3+m)+A*(4+m)))*cos(d*x+c)^(1+m)*hypergeom([1/2, 1/2+1/2*m],[3/2+1/2*m],c os(d*x+c)^2)*sin(d*x+c)/d/(4+m)/(m^2+3*m+2)/(sin(d*x+c)^2)^(1/2)-2*a*b*(C* (2+m)+A*(3+m))*cos(d*x+c)^(2+m)*hypergeom([1/2, 1+1/2*m],[2+1/2*m],cos(d*x +c)^2)*sin(d*x+c)/d/(2+m)/(3+m)/(sin(d*x+c)^2)^(1/2)
Time = 2.24 (sec) , antiderivative size = 250, normalized size of antiderivative = 0.79 \[ \int \cos ^m(c+d x) (a+b \cos (c+d x))^2 \left (A+C \cos ^2(c+d x)\right ) \, dx=\frac {\cos ^{1+m}(c+d x) \csc (c+d x) \left (-\frac {a^2 A \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1+m}{2},\frac {3+m}{2},\cos ^2(c+d x)\right )}{1+m}+\cos (c+d x) \left (-\frac {2 a A b \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {2+m}{2},\frac {4+m}{2},\cos ^2(c+d x)\right )}{2+m}+\cos (c+d x) \left (-\frac {\left (A b^2+a^2 C\right ) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {3+m}{2},\frac {5+m}{2},\cos ^2(c+d x)\right )}{3+m}+b C \cos (c+d x) \left (-\frac {2 a \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {4+m}{2},\frac {6+m}{2},\cos ^2(c+d x)\right )}{4+m}-\frac {b \cos (c+d x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {5+m}{2},\frac {7+m}{2},\cos ^2(c+d x)\right )}{5+m}\right )\right )\right )\right ) \sqrt {\sin ^2(c+d x)}}{d} \]
(Cos[c + d*x]^(1 + m)*Csc[c + d*x]*(-((a^2*A*Hypergeometric2F1[1/2, (1 + m )/2, (3 + m)/2, Cos[c + d*x]^2])/(1 + m)) + Cos[c + d*x]*((-2*a*A*b*Hyperg eometric2F1[1/2, (2 + m)/2, (4 + m)/2, Cos[c + d*x]^2])/(2 + m) + Cos[c + d*x]*(-(((A*b^2 + a^2*C)*Hypergeometric2F1[1/2, (3 + m)/2, (5 + m)/2, Cos[ c + d*x]^2])/(3 + m)) + b*C*Cos[c + d*x]*((-2*a*Hypergeometric2F1[1/2, (4 + m)/2, (6 + m)/2, Cos[c + d*x]^2])/(4 + m) - (b*Cos[c + d*x]*Hypergeometr ic2F1[1/2, (5 + m)/2, (7 + m)/2, Cos[c + d*x]^2])/(5 + m)))))*Sqrt[Sin[c + d*x]^2])/d
Time = 1.38 (sec) , antiderivative size = 318, normalized size of antiderivative = 1.00, number of steps used = 10, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.303, Rules used = {3042, 3529, 3042, 3512, 3042, 3502, 3042, 3227, 3042, 3122}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \cos ^m(c+d x) (a+b \cos (c+d x))^2 \left (A+C \cos ^2(c+d x)\right ) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \sin \left (c+d x+\frac {\pi }{2}\right )^m \left (a+b \sin \left (c+d x+\frac {\pi }{2}\right )\right )^2 \left (A+C \sin \left (c+d x+\frac {\pi }{2}\right )^2\right )dx\) |
\(\Big \downarrow \) 3529 |
\(\displaystyle \frac {\int \cos ^m(c+d x) (a+b \cos (c+d x)) \left (2 a C \cos ^2(c+d x)+b (C (m+3)+A (m+4)) \cos (c+d x)+a (C (m+1)+A (m+4))\right )dx}{m+4}+\frac {C \sin (c+d x) \cos ^{m+1}(c+d x) (a+b \cos (c+d x))^2}{d (m+4)}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \sin \left (c+d x+\frac {\pi }{2}\right )^m \left (a+b \sin \left (c+d x+\frac {\pi }{2}\right )\right ) \left (2 a C \sin \left (c+d x+\frac {\pi }{2}\right )^2+b (C (m+3)+A (m+4)) \sin \left (c+d x+\frac {\pi }{2}\right )+a (C (m+1)+A (m+4))\right )dx}{m+4}+\frac {C \sin (c+d x) \cos ^{m+1}(c+d x) (a+b \cos (c+d x))^2}{d (m+4)}\) |
\(\Big \downarrow \) 3512 |
\(\displaystyle \frac {\frac {\int \cos ^m(c+d x) \left ((m+3) (C (m+1)+A (m+4)) a^2+2 b (m+4) (C (m+2)+A (m+3)) \cos (c+d x) a+(m+3) \left (2 C a^2+b^2 (C (m+3)+A (m+4))\right ) \cos ^2(c+d x)\right )dx}{m+3}+\frac {2 a b C \sin (c+d x) \cos ^{m+2}(c+d x)}{d (m+3)}}{m+4}+\frac {C \sin (c+d x) \cos ^{m+1}(c+d x) (a+b \cos (c+d x))^2}{d (m+4)}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {\int \sin \left (c+d x+\frac {\pi }{2}\right )^m \left ((m+3) (C (m+1)+A (m+4)) a^2+2 b (m+4) (C (m+2)+A (m+3)) \sin \left (c+d x+\frac {\pi }{2}\right ) a+(m+3) \left (2 C a^2+b^2 (C (m+3)+A (m+4))\right ) \sin \left (c+d x+\frac {\pi }{2}\right )^2\right )dx}{m+3}+\frac {2 a b C \sin (c+d x) \cos ^{m+2}(c+d x)}{d (m+3)}}{m+4}+\frac {C \sin (c+d x) \cos ^{m+1}(c+d x) (a+b \cos (c+d x))^2}{d (m+4)}\) |
\(\Big \downarrow \) 3502 |
\(\displaystyle \frac {\frac {\frac {\int \cos ^m(c+d x) \left ((m+3) \left ((m+4) (C (m+1)+A (m+2)) a^2+b^2 (m+1) (C (m+3)+A (m+4))\right )+2 a b (m+2) (m+4) (C (m+2)+A (m+3)) \cos (c+d x)\right )dx}{m+2}+\frac {(m+3) \sin (c+d x) \left (2 a^2 C+b^2 (A (m+4)+C (m+3))\right ) \cos ^{m+1}(c+d x)}{d (m+2)}}{m+3}+\frac {2 a b C \sin (c+d x) \cos ^{m+2}(c+d x)}{d (m+3)}}{m+4}+\frac {C \sin (c+d x) \cos ^{m+1}(c+d x) (a+b \cos (c+d x))^2}{d (m+4)}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {\frac {\int \sin \left (c+d x+\frac {\pi }{2}\right )^m \left ((m+3) \left ((m+4) (C (m+1)+A (m+2)) a^2+b^2 (m+1) (C (m+3)+A (m+4))\right )+2 a b (m+2) (m+4) (C (m+2)+A (m+3)) \sin \left (c+d x+\frac {\pi }{2}\right )\right )dx}{m+2}+\frac {(m+3) \sin (c+d x) \left (2 a^2 C+b^2 (A (m+4)+C (m+3))\right ) \cos ^{m+1}(c+d x)}{d (m+2)}}{m+3}+\frac {2 a b C \sin (c+d x) \cos ^{m+2}(c+d x)}{d (m+3)}}{m+4}+\frac {C \sin (c+d x) \cos ^{m+1}(c+d x) (a+b \cos (c+d x))^2}{d (m+4)}\) |
\(\Big \downarrow \) 3227 |
\(\displaystyle \frac {\frac {\frac {(m+3) \left (a^2 (m+4) (A (m+2)+C (m+1))+b^2 (m+1) (A (m+4)+C (m+3))\right ) \int \cos ^m(c+d x)dx+2 a b (m+2) (m+4) (A (m+3)+C (m+2)) \int \cos ^{m+1}(c+d x)dx}{m+2}+\frac {(m+3) \sin (c+d x) \left (2 a^2 C+b^2 (A (m+4)+C (m+3))\right ) \cos ^{m+1}(c+d x)}{d (m+2)}}{m+3}+\frac {2 a b C \sin (c+d x) \cos ^{m+2}(c+d x)}{d (m+3)}}{m+4}+\frac {C \sin (c+d x) \cos ^{m+1}(c+d x) (a+b \cos (c+d x))^2}{d (m+4)}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {\frac {(m+3) \left (a^2 (m+4) (A (m+2)+C (m+1))+b^2 (m+1) (A (m+4)+C (m+3))\right ) \int \sin \left (c+d x+\frac {\pi }{2}\right )^mdx+2 a b (m+2) (m+4) (A (m+3)+C (m+2)) \int \sin \left (c+d x+\frac {\pi }{2}\right )^{m+1}dx}{m+2}+\frac {(m+3) \sin (c+d x) \left (2 a^2 C+b^2 (A (m+4)+C (m+3))\right ) \cos ^{m+1}(c+d x)}{d (m+2)}}{m+3}+\frac {2 a b C \sin (c+d x) \cos ^{m+2}(c+d x)}{d (m+3)}}{m+4}+\frac {C \sin (c+d x) \cos ^{m+1}(c+d x) (a+b \cos (c+d x))^2}{d (m+4)}\) |
\(\Big \downarrow \) 3122 |
\(\displaystyle \frac {\frac {\frac {-\frac {(m+3) \sin (c+d x) \left (a^2 (m+4) (A (m+2)+C (m+1))+b^2 (m+1) (A (m+4)+C (m+3))\right ) \cos ^{m+1}(c+d x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {m+1}{2},\frac {m+3}{2},\cos ^2(c+d x)\right )}{d (m+1) \sqrt {\sin ^2(c+d x)}}-\frac {2 a b (m+4) (A (m+3)+C (m+2)) \sin (c+d x) \cos ^{m+2}(c+d x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {m+2}{2},\frac {m+4}{2},\cos ^2(c+d x)\right )}{d \sqrt {\sin ^2(c+d x)}}}{m+2}+\frac {(m+3) \sin (c+d x) \left (2 a^2 C+b^2 (A (m+4)+C (m+3))\right ) \cos ^{m+1}(c+d x)}{d (m+2)}}{m+3}+\frac {2 a b C \sin (c+d x) \cos ^{m+2}(c+d x)}{d (m+3)}}{m+4}+\frac {C \sin (c+d x) \cos ^{m+1}(c+d x) (a+b \cos (c+d x))^2}{d (m+4)}\) |
(C*Cos[c + d*x]^(1 + m)*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(d*(4 + m)) + ((2*a*b*C*Cos[c + d*x]^(2 + m)*Sin[c + d*x])/(d*(3 + m)) + (((3 + m)*(2*a ^2*C + b^2*(C*(3 + m) + A*(4 + m)))*Cos[c + d*x]^(1 + m)*Sin[c + d*x])/(d* (2 + m)) + (-(((3 + m)*(a^2*(4 + m)*(C*(1 + m) + A*(2 + m)) + b^2*(1 + m)* (C*(3 + m) + A*(4 + m)))*Cos[c + d*x]^(1 + m)*Hypergeometric2F1[1/2, (1 + m)/2, (3 + m)/2, Cos[c + d*x]^2]*Sin[c + d*x])/(d*(1 + m)*Sqrt[Sin[c + d*x ]^2])) - (2*a*b*(4 + m)*(C*(2 + m) + A*(3 + m))*Cos[c + d*x]^(2 + m)*Hyper geometric2F1[1/2, (2 + m)/2, (4 + m)/2, Cos[c + d*x]^2]*Sin[c + d*x])/(d*S qrt[Sin[c + d*x]^2]))/(2 + m))/(3 + m))/(4 + m)
3.8.66.3.1 Defintions of rubi rules used
Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[Cos[c + d*x]*(( b*Sin[c + d*x])^(n + 1)/(b*d*(n + 1)*Sqrt[Cos[c + d*x]^2]))*Hypergeometric2 F1[1/2, (n + 1)/2, (n + 3)/2, Sin[c + d*x]^2], x] /; FreeQ[{b, c, d, n}, x] && !IntegerQ[2*n]
Int[((b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*sin[(e_.) + (f_.)*(x _)]), x_Symbol] :> Simp[c Int[(b*Sin[e + f*x])^m, x], x] + Simp[d/b Int [(b*Sin[e + f*x])^(m + 1), x], x] /; FreeQ[{b, c, d, e, f, m}, x]
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(-C)*Co s[e + f*x]*((a + b*Sin[e + f*x])^(m + 1)/(b*f*(m + 2))), x] + Simp[1/(b*(m + 2)) Int[(a + b*Sin[e + f*x])^m*Simp[A*b*(m + 2) + b*C*(m + 1) + (b*B*(m + 2) - a*C)*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, e, f, A, B, C, m}, x] && !LtQ[m, -1]
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_) + (d_.)*sin[(e_.) + (f_.)*(x_)])*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f _.)*(x_)]^2), x_Symbol] :> Simp[(-C)*d*Cos[e + f*x]*Sin[e + f*x]*((a + b*Si n[e + f*x])^(m + 1)/(b*f*(m + 3))), x] + Simp[1/(b*(m + 3)) Int[(a + b*Si n[e + f*x])^m*Simp[a*C*d + A*b*c*(m + 3) + b*(B*c*(m + 3) + d*(C*(m + 2) + A*(m + 3)))*Sin[e + f*x] - (2*a*C*d - b*(c*C + B*d)*(m + 3))*Sin[e + f*x]^2 , x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B, C, m}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0] && !LtQ[m, -1]
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.)*((A_.) + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] : > Simp[(-C)*Cos[e + f*x]*(a + b*Sin[e + f*x])^m*((c + d*Sin[e + f*x])^(n + 1)/(d*f*(m + n + 2))), x] + Simp[1/(d*(m + n + 2)) Int[(a + b*Sin[e + f*x ])^(m - 1)*(c + d*Sin[e + f*x])^n*Simp[a*A*d*(m + n + 2) + C*(b*c*m + a*d*( n + 1)) + (A*b*d*(m + n + 2) - C*(a*c - b*d*(m + n + 1)))*Sin[e + f*x] + C* (a*d*m - b*c*(m + 1))*Sin[e + f*x]^2, x], x], x] /; FreeQ[{a, b, c, d, e, f , A, C, n}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && GtQ[m, 0] && !(IGtQ[n, 0] && ( !IntegerQ[m] || (EqQ[a, 0] && NeQ[c, 0])))
\[\int \left (\cos ^{m}\left (d x +c \right )\right ) \left (a +\cos \left (d x +c \right ) b \right )^{2} \left (A +C \left (\cos ^{2}\left (d x +c \right )\right )\right )d x\]
\[ \int \cos ^m(c+d x) (a+b \cos (c+d x))^2 \left (A+C \cos ^2(c+d x)\right ) \, dx=\int { {\left (C \cos \left (d x + c\right )^{2} + A\right )} {\left (b \cos \left (d x + c\right ) + a\right )}^{2} \cos \left (d x + c\right )^{m} \,d x } \]
integral((C*b^2*cos(d*x + c)^4 + 2*C*a*b*cos(d*x + c)^3 + 2*A*a*b*cos(d*x + c) + A*a^2 + (C*a^2 + A*b^2)*cos(d*x + c)^2)*cos(d*x + c)^m, x)
Timed out. \[ \int \cos ^m(c+d x) (a+b \cos (c+d x))^2 \left (A+C \cos ^2(c+d x)\right ) \, dx=\text {Timed out} \]
\[ \int \cos ^m(c+d x) (a+b \cos (c+d x))^2 \left (A+C \cos ^2(c+d x)\right ) \, dx=\int { {\left (C \cos \left (d x + c\right )^{2} + A\right )} {\left (b \cos \left (d x + c\right ) + a\right )}^{2} \cos \left (d x + c\right )^{m} \,d x } \]
\[ \int \cos ^m(c+d x) (a+b \cos (c+d x))^2 \left (A+C \cos ^2(c+d x)\right ) \, dx=\int { {\left (C \cos \left (d x + c\right )^{2} + A\right )} {\left (b \cos \left (d x + c\right ) + a\right )}^{2} \cos \left (d x + c\right )^{m} \,d x } \]
Timed out. \[ \int \cos ^m(c+d x) (a+b \cos (c+d x))^2 \left (A+C \cos ^2(c+d x)\right ) \, dx=\int {\cos \left (c+d\,x\right )}^m\,\left (C\,{\cos \left (c+d\,x\right )}^2+A\right )\,{\left (a+b\,\cos \left (c+d\,x\right )\right )}^2 \,d x \]